package casbin_dto

import "github.com/ifnk/micro-blog/protobuf/permission_pb"

// Casbin structure for input parameters
type CasbinInReceive struct {
	AuthorityId string                      `json:"authorityId"` // 权限id
	CasbinInfos []*permission_pb.CasbinInfo `json:"casbinInfos"`
}

func DefaultCasbin() []permission_pb.CasbinInfo {
	return []permission_pb.CasbinInfo{
		{Path: "/menu/getMenu", Method: "POST"},
		{Path: "/jwt/jsonInBlacklist", Method: "POST"},
		{Path: "/base/login", Method: "POST"},
		{Path: "/user/register", Method: "POST"},
		{Path: "/user/changePassword", Method: "POST"},
		{Path: "/user/setUserAuthority", Method: "POST"},
		{Path: "/user/setUserInfo", Method: "PUT"},
		{Path: "/user/getUserInfo", Method: "GET"},
	}
}
